package org.example.lotterysystem.controller.param;

import java.io.Serializable;
import java.util.Objects;

public class UserLoginParam implements Serializable {
    /**
     * 强制某身份登录,不填不限制身份
     * @see org.example.lotterysystem.service.enums.UserIdentityEnum#name()
     */
    private String mandatoryIdentity;

    public String getMandatoryIdentity() {
        return mandatoryIdentity;
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        UserLoginParam that = (UserLoginParam) object;
        return Objects.equals(mandatoryIdentity, that.mandatoryIdentity);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(mandatoryIdentity);
    }

    public void setMandatoryIdentity(String mandatoryIdentity) {
        this.mandatoryIdentity = mandatoryIdentity;
    }
}
